﻿using Microsoft.EntityFrameworkCore;

namespace SelfService.HaiTai.Models.HisOracle
{
    public partial class HisContext : DbContext
    {
        public HisContext()
        {
        }

        public HisContext(DbContextOptions<HisContext> options)
            : base(options)
        {
        }

        public virtual DbSet<VHisDzfp> HisReceipts { get; set; }
        public virtual DbSet<ZzjJbxxcx> HisPatients { get; set; }
        
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.HasDefaultSchema("HIS")
                .UseCollation("USING_NLS_COMP");

            modelBuilder.Entity<VHisDzfp>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_HIS_DZFP");

                entity.Property(e => e.Dz2)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("DZ2");

                entity.Property(e => e.JsRq)
                    .HasColumnType("DATE")
                    .HasColumnName("JS_RQ");

                entity.Property(e => e.JsZje)
                    .HasColumnType("NUMBER(20,4)")
                    .HasColumnName("JS_ZJE");

                entity.Property(e => e.JslshId)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("JSLSH_ID");

                entity.Property(e => e.Jzkh)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("JZKH");

                entity.Property(e => e.MzZyFlag)
                    .HasMaxLength(1)
                    .IsUnicode(false)
                    .HasColumnName("MZ_ZY_FLAG")
                    .IsFixedLength();

                entity.Property(e => e.Nwpdf)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("NWPDF");

                entity.Property(e => e.PatId)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("PAT_ID");

                entity.Property(e => e.PatName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("PAT_NAME");

                entity.Property(e => e.PjFlag)
                    .HasMaxLength(1)
                    .IsUnicode(false)
                    .HasColumnName("PJ_FLAG");

                entity.Property(e => e.ZjHm)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("ZJ_HM");
            });

            modelBuilder.Entity<ZzjJbxxcx>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("ZZJ_JBXXCX");

                entity.Property(e => e.Accbalance)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("ACCBALANCE")
                    .IsFixedLength();

                entity.Property(e => e.Age)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("AGE")
                    .IsFixedLength();

                entity.Property(e => e.Availableamt)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("AVAILABLEAMT")
                    .IsFixedLength();

                entity.Property(e => e.Bankname)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("BANKNAME")
                    .IsFixedLength();

                entity.Property(e => e.Bankno)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("BANKNO")
                    .IsFixedLength();

                entity.Property(e => e.Bindingdate)
                    .HasColumnType("DATE")
                    .HasColumnName("BINDINGDATE");

                entity.Property(e => e.Cardno)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("CARDNO");

                entity.Property(e => e.Cardstatus)
                    .HasMaxLength(1)
                    .IsUnicode(false)
                    .HasColumnName("CARDSTATUS");

                entity.Property(e => e.Czbz)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("CZBZ")
                    .IsFixedLength();

                entity.Property(e => e.Idcardno)
                    .IsRequired()
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("IDCARDNO");

                entity.Property(e => e.Patid)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("PATID");

                entity.Property(e => e.Patname)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("PATNAME");

                entity.Property(e => e.Pmoney)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("PMONEY")
                    .IsFixedLength();

                entity.Property(e => e.Tel)
                    .HasMaxLength(2000)
                    .IsUnicode(false)
                    .HasColumnName("TEL")
                    .IsFixedLength();
            });

            modelBuilder.HasSequence("ACTIVITY_LOG_SEQ");

            modelBuilder.HasSequence("API_SEQUENCE");

            modelBuilder.HasSequence("BABYID");

            modelBuilder.HasSequence("BANK_REQUEST_SEQ");

            modelBuilder.HasSequence("BANKSEQ");

            modelBuilder.HasSequence("BASYFEE_SEQ");

            modelBuilder.HasSequence("BAZD_SEQ");

            modelBuilder.HasSequence("BILLSEQ");

            modelBuilder.HasSequence("BLAPPLYSEQ");

            modelBuilder.HasSequence("BLDETAILSEQ");

            modelBuilder.HasSequence("BLJYJG");

            modelBuilder.HasSequence("BLSEQ");

            modelBuilder.HasSequence("BLZDSEQ");

            modelBuilder.HasSequence("BQCWSYJL_SEQ");

            modelBuilder.HasSequence("BQYLYW_SEQ");

            modelBuilder.HasSequence("BYJ_SEQ");

            modelBuilder.HasSequence("BYYPD_SEQ");

            modelBuilder.HasSequence("BYYPMX_SEQ");

            modelBuilder.HasSequence("CABZFDXXJL_SEQ");

            modelBuilder.HasSequence("CADJJL_SEQ");

            modelBuilder.HasSequence("CAJSJL_SEQ");

            modelBuilder.HasSequence("CAJZFDXXJL_SEQ");

            modelBuilder.HasSequence("CALLJL_SEQ");

            modelBuilder.HasSequence("CASHACCOUNTSEQ");

            modelBuilder.HasSequence("CASHCARDSEQ");

            modelBuilder.HasSequence("CASHYJKSEQ");

            modelBuilder.HasSequence("CFSEQ");

            modelBuilder.HasSequence("CHANGE_FIELD_SEQ");

            modelBuilder.HasSequence("CHANNEL_SEQUENCE");

            modelBuilder.HasSequence("CHARGEKSID");

            modelBuilder.HasSequence("CHARGEMXID");

            modelBuilder.HasSequence("CLASS_INFO_SEQ");

            modelBuilder.HasSequence("COUNT_LIST_JL");

            modelBuilder.HasSequence("CRKDH_SEQ");

            modelBuilder.HasSequence("CRKJLID_SEQ");

            modelBuilder.HasSequence("CWSY_SEQ");

            modelBuilder.HasSequence("CWTZ_SEQ");

            modelBuilder.HasSequence("DOCTOR_CALL_SEQ");

            modelBuilder.HasSequence("DRGS_SEQ");

            modelBuilder.HasSequence("DRUG_INFO_REPORT_SEQ");

            modelBuilder.HasSequence("DRUGORDER_SEQ");

            modelBuilder.HasSequence("DSCL_JSLSH_SEQ");

            modelBuilder.HasSequence("DSY_DYDH");

            modelBuilder.HasSequence("DZPJ_SEQ");

            modelBuilder.HasSequence("EMR_PTLSH_SEQ");

            modelBuilder.HasSequence("EMR_SEQ");

            modelBuilder.HasSequence("EVALUATE_INFO_SEQ");

            modelBuilder.HasSequence("EXCEPTION_SEQUENCE");

            modelBuilder.HasSequence("EXECLOG").IsCyclic();

            modelBuilder.HasSequence("FILE_SEQ");

            modelBuilder.HasSequence("FXDY_SEQ");

            modelBuilder.HasSequence("FYHZ_SEQ");

            modelBuilder.HasSequence("FYMX_SEQ");

            modelBuilder.HasSequence("FYXM_SEQ");

            modelBuilder.HasSequence("GZLHZ_SEQ");

            modelBuilder.HasSequence("GZLJL_SEQ");

            modelBuilder.HasSequence("HIS_CQSC_SEQ");

            modelBuilder.HasSequence("HIS_FUP_SEQ");

            modelBuilder.HasSequence("HIS_JDID");

            modelBuilder.HasSequence("HIS_RLLINE_SEQ");

            modelBuilder.HasSequence("HISFEEMX_SEQ");

            modelBuilder.HasSequence("HISSEQ");

            modelBuilder.HasSequence("HJJL_SEQ");

            modelBuilder.HasSequence("INPAT_WJSBRFY_SEQ");

            modelBuilder.HasSequence("INPATCOSTSEQ");

            modelBuilder.HasSequence("INTERFACES_SEQUENCE");

            modelBuilder.HasSequence("JCPX_SEQ");

            modelBuilder.HasSequence("JYSQD_SEQ");

            modelBuilder.HasSequence("JZJLSEQ");

            modelBuilder.HasSequence("JZKH_SEQ");

            modelBuilder.HasSequence("JZQJDJ_SEQ");

            modelBuilder.HasSequence("KABJL_SEQ");

            modelBuilder.HasSequence("LEASE_SEQ");

            modelBuilder.HasSequence("LGH_SEQ");

            modelBuilder.HasSequence("LGID_SEQ");

            modelBuilder.HasSequence("LINENOSEQ");

            modelBuilder.HasSequence("LISREPORTITEM_SEQ");

            modelBuilder.HasSequence("LOGPDAHLSEQ");

            modelBuilder.HasSequence("LOGPDASEQ");

            modelBuilder.HasSequence("LSTD_FYSP_SEQ");

            modelBuilder.HasSequence("LSTDFP_YBSP_SEQ");

            modelBuilder.HasSequence("MI_DZJJZF_SEQ");

            modelBuilder.HasSequence("MI_DZJL_SEQ");

            modelBuilder.HasSequence("MI_TRANS_FEE_SEQ");

            modelBuilder.HasSequence("MI_TRANS_FYLB_SEQ");

            modelBuilder.HasSequence("MI_TRANS_JJZF_SEQ");

            modelBuilder.HasSequence("MI_TRANS_SEQ");

            modelBuilder.HasSequence("MI_TRANS_ZFJS_SEQUENCE");

            modelBuilder.HasSequence("MILIST_SEQ");

            modelBuilder.HasSequence("MJZCAOYAO_SEQ");

            modelBuilder.HasSequence("MZINFO_JLID");

            modelBuilder.HasSequence("MZJSCF_LSH_SEQ");

            modelBuilder.HasSequence("MZKH_SEQ");

            modelBuilder.HasSequence("ORDER_QTXTDYM_SEG");

            modelBuilder.HasSequence("ORDERACTSEQ");

            modelBuilder.HasSequence("ORDERSEQ");

            modelBuilder.HasSequence("ORGBIZSERSEQ");

            modelBuilder.HasSequence("PACS_PDHJ_SEQ");

            modelBuilder.HasSequence("PACS_TEAM_SEQ");

            modelBuilder.HasSequence("PATFPMXSEQ");

            modelBuilder.HasSequence("PATPAYMXSEQ");

            modelBuilder.HasSequence("PATPAYSEQ");

            modelBuilder.HasSequence("PATSEQ");

            modelBuilder.HasSequence("PATSEQ_TEMP");

            modelBuilder.HasSequence("PBSEQ");

            modelBuilder.HasSequence("PCLRDDH_SEQ");

            modelBuilder.HasSequence("PCLRJLID_SEQ");

            modelBuilder.HasSequence("PCYKJL_SEQ");

            modelBuilder.HasSequence("PDAXSJLSEQ");

            modelBuilder.HasSequence("PK_SEQ");

            modelBuilder.HasSequence("PLSQL_PROFILER_RUNNUMBER");

            modelBuilder.HasSequence("POSNSSEQ").IsCyclic();

            modelBuilder.HasSequence("POWER_SEQ");

            modelBuilder.HasSequence("PRINT_SEQ");

            modelBuilder.HasSequence("PROJECT_SEQ");

            modelBuilder.HasSequence("QLDH_SEQ");

            modelBuilder.HasSequence("QSXX_SEQ");

            modelBuilder.HasSequence("QUESTION_SEQ");

            modelBuilder.HasSequence("QUESTION_TYPE_SEQ");

            modelBuilder.HasSequence("SBJL_LSH");

            modelBuilder.HasSequence("SD_OPCODE");

            modelBuilder.HasSequence("SEQ_BQ_FYMXID");

            modelBuilder.HasSequence("SEQ_HISLOG").IsCyclic();

            modelBuilder.HasSequence("SEQ_SERVICE_NT");

            modelBuilder.HasSequence("SHKKJL_ID_SEQ");

            modelBuilder.HasSequence("SMKJY_SEQ");

            modelBuilder.HasSequence("SSRY_AP");

            modelBuilder.HasSequence("SSSQD_SEQ");

            modelBuilder.HasSequence("STATE_TABLE_SEQ");

            modelBuilder.HasSequence("SV_SEQ");

            modelBuilder.HasSequence("SVLOG_SEQ");

            modelBuilder.HasSequence("SYJL_SEQ");

            modelBuilder.HasSequence("SYXJB_SEQ");

            modelBuilder.HasSequence("TEMP_SEQ");

            modelBuilder.HasSequence("TEST_SEQ");

            modelBuilder.HasSequence("TJJL_SEQ");

            modelBuilder.HasSequence("TRADELOG_SEQ");

            modelBuilder.HasSequence("TSLX_SEQ");

            modelBuilder.HasSequence("TXJL_SEQ");

            modelBuilder.HasSequence("USER_SEQ");

            modelBuilder.HasSequence("USERS_SEQUENCE");

            modelBuilder.HasSequence("WKYYSEQ");

            modelBuilder.HasSequence("WZ_WZM");

            modelBuilder.HasSequence("WZCRK_DH_SEQ");

            modelBuilder.HasSequence("WZRCKJL_SEQ");

            modelBuilder.HasSequence("WZRKJL_SEQ");

            modelBuilder.HasSequence("WZSBK_SEQ");

            modelBuilder.HasSequence("WZSQDH_SEQ");

            modelBuilder.HasSequence("XKKCJLSEQ");

            modelBuilder.HasSequence("XKRKDHSEQ");

            modelBuilder.HasSequence("XKRKJLSEQ");

            modelBuilder.HasSequence("XMLSN");

            modelBuilder.HasSequence("XTZYH_SEQ");

            modelBuilder.HasSequence("XXXG_SEQ");

            modelBuilder.HasSequence("YBDZHZ_SEQ");

            modelBuilder.HasSequence("YDZF_SEQ");

            modelBuilder.HasSequence("YFRPT_SEQ");

            modelBuilder.HasSequence("YK_YPM");

            modelBuilder.HasSequence("YP_CRKJL_SEQ");

            modelBuilder.HasSequence("YP_SEQ");

            modelBuilder.HasSequence("YPCGD_SEQ");

            modelBuilder.HasSequence("YPCKDH_SEQ");

            modelBuilder.HasSequence("YPCKJL_SEQ");

            modelBuilder.HasSequence("YPKC_SEQ");

            modelBuilder.HasSequence("YPREPORT_SEQ");

            modelBuilder.HasSequence("YPRKDH_SEQ");

            modelBuilder.HasSequence("YPRKJL_SEQ");

            modelBuilder.HasSequence("YPTJD_SEQ");

            modelBuilder.HasSequence("YPTJDKC_SEQ");

            modelBuilder.HasSequence("YPTJDMX_SEQ");

            modelBuilder.HasSequence("YPZBJL_SEQ");

            modelBuilder.HasSequence("YYPZH_SEQ");

            modelBuilder.HasSequence("YYSEQ");

            modelBuilder.HasSequence("YZBGD_SEQ");

            modelBuilder.HasSequence("ZBJL_SEQ");

            modelBuilder.HasSequence("ZCFJL_SEQ");

            modelBuilder.HasSequence("ZSMRHB_SEQ");

            modelBuilder.HasSequence("ZXKS_UPD");

            modelBuilder.HasSequence("ZY_COST_SEQ");

            modelBuilder.HasSequence("ZY_CWTZ_SEQ");

            modelBuilder.HasSequence("ZY_JZLSH_SEQ");

            modelBuilder.HasSequence("ZY_ORDER_SEQ");

            modelBuilder.HasSequence("ZY_YZZXLSH_SEQ");

            modelBuilder.HasSequence("ZY_ZKJL_SEQ");

            modelBuilder.HasSequence("ZYCAOYAO_SEQ");

            modelBuilder.HasSequence("ZYH_SEQ");

            modelBuilder.HasSequence("ZYLSH_SEQ");

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
